package cm.cool.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cm.cool.web.bean.User;
import cm.cool.web.service.user.UserService;
import cm.cool.web.util.respon.PaginationDto;
import cm.cool.web.util.respon.R;

@Controller
@RequestMapping("/User")
public class UserContrller {
	
	@Autowired
	UserService userService;
	
	/**
	 * 条件查找会员信息
	 * @param user
	 * @param paginationDto
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/selectByAll")
	public R selectByAll(User user,PaginationDto paginationDto){
		return userService.selectByAll(user, paginationDto);
	}
	
	/**
	 * 修改状态
	 * @param user
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/updateBillState")
	public R updateBillState(User user){
		return userService.updateBillState(user);
	}
}
